<?php 
namespace Administrator\Model;

class Resource
{
	public $id;
	public $resource_name;	

	public $name_resource;
	
	public function exchangeArray($data)
	{
		$this->id     = (!empty($data['id'])) ? $data['id'] : null;
		$this->resource_name = (!empty($data['resource_name'])) ? $data['resource_name'] : null;	
	}
	
	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}
	
	
	public function addArray($data)
	{
		$this->name_resource = (!empty($data['name_resource'])) ? $data['name_resource'] : null;
	}
}